Estimating the progress of linear operations such as file downloads is generally straightforward. Given a file of a known size, if it takes T units of time to download half of the file, then it will most likely take about 2T units of time to download the entire file.
In contrast, estimating the progress of database queries is generally not as straightforward. A given database query may involve a plurality of sub-operations, such as, for example, loading a given table, sorting entries within the table, selecting certain elements of the table that satisfy query constraints, and outputting the results of the foregoing operations. This overall process and the constituent sub-operations may not always be linear, so estimating the progress of a given database query may not be as straightforward as in the file-download example given above.
More particularly, the amount of work involved in servicing a given database query may not be distributed evenly among the various sub-operations of the database query. Also, the workload may be skewed unpredictably toward one or more of the sub-operations. Thus, estimating the progress of the query based on the status or history of one of the sub-operations may be inaccurate if that sub-operation accounts for relatively little of the workload associated with servicing the overall query. Accordingly, a need exists in the art for improved techniques for estimating the progress of database queries.